package com.javasm.domin.entity.goodsEntity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 
 * @TableName pa_price_administration
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("pa_price_administration")
public class PaPriceAdministration implements Serializable {
    /**
     * 价格调正编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 生效时间
     */
    private String teffectiveTime;

    /**
     * 调价幅度
     */
    private Double priceAdjustmentRange;

    /**
     * 商城价
     */
    private BigDecimal mallPrice;

    /**
     * 市场价
     */
    private Integer salePrice;

    /**
     * 商品名称
     */
    private String goodsName;

    /**
     * 审核状态
     */
    private String auditStatus;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 调价原因
     */
    private String reason;

    /**
     *失效时间
     */
    private String invalidTime;

    /**
     * 审核评语
     */
    private String auditComments;

    /**
     * 审核时间
     */

    private String auditTime;

    /**
     * 审核人
     */
    private String reviewer;

    /**
     * 调整后的商城价
     */
    private Integer adjustmentMallPrice;

    /**
     * 调整后市场价
     */
    private Integer adjustmentSalePrice;

    /**
     * 商品库存
     */
    private Integer goodsStock;

    /**
     * 商品编号
     */
    private Integer goodsId;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PaPriceAdministration other = (PaPriceAdministration) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTeffectiveTime() == null ? other.getTeffectiveTime() == null : this.getTeffectiveTime().equals(other.getTeffectiveTime()))
            && (this.getPriceAdjustmentRange() == null ? other.getPriceAdjustmentRange() == null : this.getPriceAdjustmentRange().equals(other.getPriceAdjustmentRange()))
            && (this.getMallPrice() == null ? other.getMallPrice() == null : this.getMallPrice().equals(other.getMallPrice()))
            && (this.getSalePrice() == null ? other.getSalePrice() == null : this.getSalePrice().equals(other.getSalePrice()))
            && (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName()))
            && (this.getAuditStatus() == null ? other.getAuditStatus() == null : this.getAuditStatus().equals(other.getAuditStatus()))
            && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
            && (this.getReason() == null ? other.getReason() == null : this.getReason().equals(other.getReason()))
            && (this.getInvalidTime() == null ? other.getInvalidTime() == null : this.getInvalidTime().equals(other.getInvalidTime()))
            && (this.getAuditComments() == null ? other.getAuditComments() == null : this.getAuditComments().equals(other.getAuditComments()))
            && (this.getAuditTime() == null ? other.getAuditTime() == null : this.getAuditTime().equals(other.getAuditTime()))
            && (this.getReviewer() == null ? other.getReviewer() == null : this.getReviewer().equals(other.getReviewer()))
            && (this.getAdjustmentMallPrice() == null ? other.getAdjustmentMallPrice() == null : this.getAdjustmentMallPrice().equals(other.getAdjustmentMallPrice()))
            && (this.getAdjustmentSalePrice() == null ? other.getAdjustmentSalePrice() == null : this.getAdjustmentSalePrice().equals(other.getAdjustmentSalePrice()))
            && (this.getGoodsStock() == null ? other.getGoodsStock() == null : this.getGoodsStock().equals(other.getGoodsStock()))
            && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTeffectiveTime() == null) ? 0 : getTeffectiveTime().hashCode());
        result = prime * result + ((getPriceAdjustmentRange() == null) ? 0 : getPriceAdjustmentRange().hashCode());
        result = prime * result + ((getMallPrice() == null) ? 0 : getMallPrice().hashCode());
        result = prime * result + ((getSalePrice() == null) ? 0 : getSalePrice().hashCode());
        result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode());
        result = prime * result + ((getAuditStatus() == null) ? 0 : getAuditStatus().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        result = prime * result + ((getReason() == null) ? 0 : getReason().hashCode());
        result = prime * result + ((getInvalidTime() == null) ? 0 : getInvalidTime().hashCode());
        result = prime * result + ((getAuditComments() == null) ? 0 : getAuditComments().hashCode());
        result = prime * result + ((getAuditTime() == null) ? 0 : getAuditTime().hashCode());
        result = prime * result + ((getReviewer() == null) ? 0 : getReviewer().hashCode());
        result = prime * result + ((getAdjustmentMallPrice() == null) ? 0 : getAdjustmentMallPrice().hashCode());
        result = prime * result + ((getAdjustmentSalePrice() == null) ? 0 : getAdjustmentSalePrice().hashCode());
        result = prime * result + ((getGoodsStock() == null) ? 0 : getGoodsStock().hashCode());
        result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", teffectiveTime=").append(teffectiveTime);
        sb.append(", priceAdjustmentRange=").append(priceAdjustmentRange);
        sb.append(", mallPrice=").append(mallPrice);
        sb.append(", salePrice=").append(salePrice);
        sb.append(", goodsName=").append(goodsName);
        sb.append(", auditStatus=").append(auditStatus);
        sb.append(", remarks=").append(remarks);
        sb.append(", reason=").append(reason);
        sb.append(", invalidTime=").append(invalidTime);
        sb.append(", auditComments=").append(auditComments);
        sb.append(", auditTime=").append(auditTime);
        sb.append(", reviewer=").append(reviewer);
        sb.append(", adjustmentMallPrice=").append(adjustmentMallPrice);
        sb.append(", adjustmentSalePrice=").append(adjustmentSalePrice);
        sb.append(", goodsStock=").append(goodsStock);
        sb.append(", goodsId=").append(goodsId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}